package com.mycar2w.cloud.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * created time 2017/4/1
 *
 * @author ljc
 * @version V1.0
 * 汽车安全配置
 */
@Entity
@Table(name = "car_security_configuration", schema = "mycar2wnew", catalog = "")
public class CarSecurityConfiguration {
    private Long id;
    private String mainDrivingSafetyAirbag;
    private String frontAndRearSideAirbags;
    private String frontAndRearAirbag;
    private String tirePressureDetection;
    private String theCarLock;
    private String childSeatInterface;
    private String keylessStart;
    private String abs;
    private String esp;
    private Long carId;

    @Id
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "main_driving_safety_airbag", nullable = true, length = 50)
    public String getMainDrivingSafetyAirbag() {
        return mainDrivingSafetyAirbag;
    }

    public void setMainDrivingSafetyAirbag(String mainDrivingSafetyAirbag) {
        this.mainDrivingSafetyAirbag = mainDrivingSafetyAirbag;
    }

    @Basic
    @Column(name = "front_and_rear_side_airbags", nullable = true, length = 50)
    public String getFrontAndRearSideAirbags() {
        return frontAndRearSideAirbags;
    }

    public void setFrontAndRearSideAirbags(String frontAndRearSideAirbags) {
        this.frontAndRearSideAirbags = frontAndRearSideAirbags;
    }

    @Basic
    @Column(name = "front_and_rear_airbag", nullable = true, length = 50)
    public String getFrontAndRearAirbag() {
        return frontAndRearAirbag;
    }

    public void setFrontAndRearAirbag(String frontAndRearAirbag) {
        this.frontAndRearAirbag = frontAndRearAirbag;
    }

    @Basic
    @Column(name = "tire_pressure_detection", nullable = true, length = 50)
    public String getTirePressureDetection() {
        return tirePressureDetection;
    }

    public void setTirePressureDetection(String tirePressureDetection) {
        this.tirePressureDetection = tirePressureDetection;
    }

    @Basic
    @Column(name = "the_car_lock", nullable = true, length = 50)
    public String getTheCarLock() {
        return theCarLock;
    }

    public void setTheCarLock(String theCarLock) {
        this.theCarLock = theCarLock;
    }

    @Basic
    @Column(name = "child_seat_interface", nullable = true, length = 50)
    public String getChildSeatInterface() {
        return childSeatInterface;
    }

    public void setChildSeatInterface(String childSeatInterface) {
        this.childSeatInterface = childSeatInterface;
    }

    @Basic
    @Column(name = "keyless_start", nullable = true, length = 50)
    public String getKeylessStart() {
        return keylessStart;
    }

    public void setKeylessStart(String keylessStart) {
        this.keylessStart = keylessStart;
    }

    @Basic
    @Column(name = "abs", nullable = true, length = 50)
    public String getAbs() {
        return abs;
    }

    public void setAbs(String abs) {
        this.abs = abs;
    }

    @Basic
    @Column(name = "esp", nullable = true, length = 50)
    public String getEsp() {
        return esp;
    }

    public void setEsp(String esp) {
        this.esp = esp;
    }

    @Basic
    @Column(name = "car_id", nullable = true)
    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CarSecurityConfiguration that = (CarSecurityConfiguration) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (mainDrivingSafetyAirbag != null ? !mainDrivingSafetyAirbag.equals(that.mainDrivingSafetyAirbag) : that.mainDrivingSafetyAirbag != null)
            return false;
        if (frontAndRearSideAirbags != null ? !frontAndRearSideAirbags.equals(that.frontAndRearSideAirbags) : that.frontAndRearSideAirbags != null)
            return false;
        if (frontAndRearAirbag != null ? !frontAndRearAirbag.equals(that.frontAndRearAirbag) : that.frontAndRearAirbag != null)
            return false;
        if (tirePressureDetection != null ? !tirePressureDetection.equals(that.tirePressureDetection) : that.tirePressureDetection != null)
            return false;
        if (theCarLock != null ? !theCarLock.equals(that.theCarLock) : that.theCarLock != null) return false;
        if (childSeatInterface != null ? !childSeatInterface.equals(that.childSeatInterface) : that.childSeatInterface != null)
            return false;
        if (keylessStart != null ? !keylessStart.equals(that.keylessStart) : that.keylessStart != null) return false;
        if (abs != null ? !abs.equals(that.abs) : that.abs != null) return false;
        if (esp != null ? !esp.equals(that.esp) : that.esp != null) return false;
        if (carId != null ? !carId.equals(that.carId) : that.carId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (mainDrivingSafetyAirbag != null ? mainDrivingSafetyAirbag.hashCode() : 0);
        result = 31 * result + (frontAndRearSideAirbags != null ? frontAndRearSideAirbags.hashCode() : 0);
        result = 31 * result + (frontAndRearAirbag != null ? frontAndRearAirbag.hashCode() : 0);
        result = 31 * result + (tirePressureDetection != null ? tirePressureDetection.hashCode() : 0);
        result = 31 * result + (theCarLock != null ? theCarLock.hashCode() : 0);
        result = 31 * result + (childSeatInterface != null ? childSeatInterface.hashCode() : 0);
        result = 31 * result + (keylessStart != null ? keylessStart.hashCode() : 0);
        result = 31 * result + (abs != null ? abs.hashCode() : 0);
        result = 31 * result + (esp != null ? esp.hashCode() : 0);
        result = 31 * result + (carId != null ? carId.hashCode() : 0);
        return result;
    }
}
